﻿using Bigway.Common.Models.DtoModels;

namespace Benefactor.Models.DtoModels;

public class IssuedBenefitsCardInfo
{
    public required string Id { get; set; }

    public required string SystemId { get; set; }

    public required string BenefitsCardId { get; set; }

    public required string CardNo { get; set; }

    public required string UserId { get; set; }

    public DateTime IssueTime { get; set; }

    public DateOnly ValidFrom { get; set; }

    public DateOnly ValidTo { get; set; }

    public DateOnly? VoucherValidFrom { get; set; }

    public DateOnly? VoucherValidTo { get; set; }

    public BenefitsCardInfo? BenefitsCard { get; set; }

    public IEnumerable<SimpleMerchantInfoWithBenefits> Merchants { get; set; } = [];
}

public class SimpleMerchantInfoWithBenefits: SimpleMerchantInfo
{
    public IEnumerable<BenefitInfoWithVouchers> Benefits { get; set; } = [];

    public SimpleMerchantInfoWithBenefits Clone()
    {
        return (SimpleMerchantInfoWithBenefits)MemberwiseClone();
    }
}

public class BenefitInfoWithVouchers: BenefitInfo
{
    public IEnumerable<VoucherInfo> Vouchers { get; set; } = [];
}